<?php

use Illuminate\Database\Seeder;

class DepartmentTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	DB::table('departments')->truncate();

        DB::table('departments')->insert([
            [
                'pid' => 0,
                'name' => '总部',
                'manager' => 0
            ],
        	[
                'pid' => 0,
        		'name' => '北区',
                'manager' => 0
        	],
            [
                'pid'  => 0,
                'name' => '南区',
                'manager' => 0
            ],
            // 总部
            [
                'pid' => 1,
                'name' => '技术研发部',
                'manager' => 0
            ], 
            [
                'pid' => 1,
                'name' => '客服部',
                'manager' => 0
            ],
            // 北区
            [
                'pid' => 2,
                'name' => '商务1部',
                'manager' => 0
            ], 
            [
                'pid' => 2,
                'name' => '商务2部',
                'manager' => 0
            ], 
            [
                'pid' => 2,
                'name' => '商务3部',
                'manager' => 6
            ], 
            [
                'pid' => 2,
                'name' => '商务4部',
                'manager' => 0
            ], 

            // 南区
            [
                'pid' => 3,
                'name' => '商务5部',
                'manager' => 0
            ], 
            [
                'pid' => 3,
                'name' => '商务6部',
                'manager' => 0
            ],
            [
                'pid' => 3,
                'name' => '商务7部',
                'manager' => 0
            ], 
            [
                'pid' => 3,
                'name' => '商务8部',
                'manager' => 0   
            ],   
        ]);
    }
}
